<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{$_title}</h2>
    </div>
    <notempty name="netvalue" >
    	<form action="{:U('Fund/editNetvalue')}" method="post" class="form-horizontal" id="formid">
    		<input type="hidden" name="id" value="{$netvalue.id}" />
    <else />
	    <form action="{:U('Fund/addNetvalue')}" method="post" class="form-horizontal" id="formid">
    </notempty>
        <div class="form-item">
            <label class="item-label">基金名称：<span class="check-tips">{$fund.fund_name}</span></label>
            <input type="hidden" name="fund_id" value="{$fund.id}" />
            <input type="hidden" name="fund_name" value="{$fund.fund_name}" />
        </div>
        <div class="form-item">
            <label class="item-label">基金经理：<span class="check-tips">{$fund.trader_name}</span></label>
        </div>
         <div class="form-item">
            <label class="item-label">基金净值：<span class="check-tips"><input class="text input-large" type="text" name="value" value="{$netvalue.value|default=''}" /></span></label>
        </div>
    <div class="form-item">
        <label class="item-label">沪深净值：<span class="check-tips"><input class="text input-large" type="text" name="netvalue_hs" value="{$netvalue.netvalue_hs|default=''}" /></span></label>
    </div>
        <div class="form-item">
            <label class="item-label">统计时间：<span class="check-tips"><input class="text input-large date_picker" type="text" name="netvalue_time" value="{$netvalue.netvalue_time_format|default=''}" /></span></label>
        </div>
        <div class="form-item">
            <label class="item-label">更新备注<span class="check-tips">（请说明更新明细）</span></label>
            <notempty name="netvalue">
            	<textarea style="width:800px;height:200px;" name="log_note"></textarea>
            </notempty>
        </div>
        <br/>
    <notempty name="netvalue" >

    <else />
            <div class="form-item">
                <label class="item-label">批量提交：<span class="check-tips"><input class=" input-large" type="file" name="netvaluefile" /></span></label>
            </div>
    </notempty>

        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="button" target-form="form-horizontal">确 定</button>
            <!--<input class="btn submit-btn " type="button" value="确 定" />-->
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>
<block name="style">
	<link href="__PUBLIC__/static/datetimepicker/css/datetimepicker.css" rel="stylesheet" media="screen">
	<link href="__PUBLIC__/static/jquery-datetimepicker/jquery-datetimepicker.css" rel="stylesheet" media="screen">
</block>
<block name="script">
   <script type="text/javascript" src="__PUBLIC__/static/jquery-datetimepicker/jquery-datetimepicker.js"></script>
    <script type="text/javascript">
  //日期时间插件
    	$('.date_picker').datetimepicker({
    		lang:'ch',
    		format:'Y-m-d',
    		timepicker:false,
    		allowBlank:true
		});
	/* $('.date_picker').datetimepicker({
		language:'zh-CN',
		format:'yyyy-mm-dd hh:ii:ss',
		todayBtn:true,
		minuteStep:1,
	}); */
        //导航高亮
        highlight_subnav("{:U('Fund/netvalueList')}");
        $("#submit").click(function(){
            $.ajax({
                url : $("#formid").attr("action"),
                data : $('#formid').serialize(),
                type: "POST",
                success: function(data){
                    alert(data.info);
                    return false;
                }
            });
        })
    </script>
</block>
